<template>
	<el-form :inline="true" :model="transfereInfo" size="mini" label-width="100px">
		<!-- <el-row style="margin-bottom: 20px">
			<el-col :span="24" v-if="outType != '99'">
				<el-steps :space="300" :active="2" finish-status="success" align-center="“true”">
					<el-step title="申请"></el-step>
					<el-step title="审核"></el-step>
					<el-step title="签名"></el-step>
					<el-step title="打印清单"></el-step>
					<el-step title="开柜存取"></el-step>
					<el-step title="归档"></el-step>
				</el-steps>
			</el-col>
		</el-row> -->
		<el-row>
			<el-col :span="8">
				<el-form-item :label="outTypeTitle + '单位：'" style="margin-bottom: 0px"> {{ transfereInfo.receiverOrgan }} </el-form-item>
			</el-col>
			<el-col :span="8">
				<el-form-item :label="outTypeTitle + '人：'" style="margin-bottom: 0px"> {{ transfereInfo.receiver }} </el-form-item>
			</el-col>
			<el-col :span="8">
				<el-form-item label="交接时间：" style="margin-bottom: 0px"> {{ dateFormatTime(transfereInfo.deliveryTime) }} </el-form-item>
			</el-col>
		</el-row>
		<el-row style="margin-top: 10px">
			<el-col :span="8">
				<el-form-item label="联系电话："> {{ transfereInfo.receiverPhone }} </el-form-item>
			</el-col>
			<el-col :span="8" v-if="outType == '1' || outType == '2'">
				<el-form-item label="回库时间："> {{ dateFormatTime(transfereInfo.returnTime) }} </el-form-item>
			</el-col>
			<el-col :span="8" v-if="outType == '6'">
				<el-form-item label="存放位置："> {{ transfereInfo.location }} </el-form-item></el-col
			>
			<el-col :span="8" v-if="outType == '6'">
				<el-form-item label="保管期限："> {{ dateFormatTime(transfereInfo.returnTime) }} </el-form-item></el-col
			>
		</el-row>
		<el-row style="margin-top: 10px">
			<el-col :span="8">
				<el-form-item :label="`${labelTitle}单位：`"> {{ transfereInfo.transferorOrgan }} </el-form-item>
			</el-col>
			<el-col :span="8">
				<el-form-item :label="`${labelTitle}人：`"> {{ transfereInfo.transferor }} </el-form-item>
			</el-col>
			<el-col :span="8">
				<el-form-item :label="`${labelTitle}人电话：`"> {{ transfereInfo.transferorPhone }} </el-form-item></el-col
			>
		</el-row>
		<el-row>
			<el-form-item :label="outTypeTitle + '意见：'" style="width: 100%; margin-top: 10px">
				{{ transfereInfo.remark }}
			</el-form-item>
		</el-row>
		<el-row>
			<el-image
				v-for="(item, index) in formInline.imgs"
				:src="item.url"
				:key="index"
				:preview-src-list="formInline.imgs"
				style="width: 250px; height: 200px; margin-left: 10px"
			>
			</el-image>
		</el-row>
	</el-form>
</template>
<script lang="ts">
import { toRefs, reactive, computed } from 'vue';
import { dateFormat, dateFormatTime, getOutType } from '/@/common/index';
export default {
	name: 'BorrowEvidenceList',
	props: {
		outType: String,
		transfereInfo: Object,
		formInline: Object,
	},
	setup(props: any) {
		const state = reactive({
			outType: props.outType,
			outTypeTitle: getOutType(props.outType),
		});
		const labelTitle = computed(() => {
			let _labelTitle = '移交';
			if (state.outType == 6) _labelTitle = '保管';
			return _labelTitle;
		});
		return {
			dateFormat,
			dateFormatTime,
			labelTitle,
			...toRefs(state),
		};
	},
};
</script>
